Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen peer dependency on openai #85

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

jasonm
Copy link
Contributor

@jasonm jasonm commented Dec 21, 2024

Thanks for releasing this library! I'm using InstructorJS and interested in comparing some Anthropic and Google models for our use cases.

Changes in this PR

Currently, package.json specifies a peerDependency for the openai library at exactly version 4.47.1. This PR loosens the dependency to any version of the library backward-compatible with 4.47.1. The openai-node repo describes their SemVer policy here: https://github.com/openai/openai-node?tab=readme-ov-file#semantic-versioning

Without this change you get, for example:

~/dev/myrepo $ npm i llm-polyglot
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/openai
npm error   openai@"^4.77.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer openai@"4.47.1" from [email protected]
npm error node_modules/llm-polyglot
npm error   llm-polyglot@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/jason/.npm/_logs/2024-12-21T00_46_43_123Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/jason/.npm/_logs/2024-12-21T00_46_43_123Z-debug-0.log

Additional related changes

I figured this was a pretty safe change given SemVer rules. I didn't make any further changes, but here are a few "while I was in there" notes 😄

Since I was looking at the peerDependencies list, I checked that the @google/generative-ai one is up-to-date with their latest release ✅

The @anthropic-ai/sdk peerDependency is specified to ^0.22.0, which is not compatible with their latest SDK. It could be worth bumping and testing that, but I haven't looked into the actual changelog and whether it has meaningful changes.


Important

Loosen openai peer dependency in package.json to allow backward-compatible versions, resolving npm installation errors.

  • Dependencies:
    • Loosen openai peer dependency in package.json from 4.47.1 to ^4.47.1 to allow backward-compatible versions.
  • Context:
    • Resolves npm installation errors due to strict versioning of openai dependency.

This description was created by Ellipsis for 60a54f4. It will automatically update as commits are pushed.

Currently, package.json specifies a `peerDependency` for the `openai` library at exactly version `4.47.1`. This PR loosens the dependency to any version of the library backward-compatible with 4.47.1. The `openai-node` repo describes their SemVer policy here: https://github.com/openai/openai-node?tab=readme-ov-file#semantic-versioning
Copy link

vercel bot commented Dec 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
island-ai-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 3:34pm

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 60a54f4 in 8 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. public-packages/llm-client/package.json:55
  • Draft comment:
    Loosening the openai peer dependency to ^4.47.1 is appropriate. This allows for backward-compatible updates, aligning with the SemVer policy of the openai library.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change to the peer dependency versioning is appropriate and aligns with the intent of the PR author. The use of the caret (^) allows for backward-compatible updates, which is consistent with the SemVer policy of the openai library.

Workflow ID: wflow_H4WYMehNns4WaOc9


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@roodboi
Copy link
Contributor

roodboi commented Dec 24, 2024

this is great, thank you! I agree Anthropic should probably be bumped to latest at this point too. I made an update recently that covered a small change in their stream response--will need to test but I think it should be safe.

roodboi
roodboi previously approved these changes Dec 24, 2024
Copy link

changeset-bot bot commented Jan 8, 2025

🦋 Changeset detected

Latest commit: 7832aeb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
llm-polyglot Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@roodboi roodboi merged commit 324af50 into hack-dance:main Jan 8, 2025
4 checks passed
@github-actions github-actions bot mentioned this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants